package fr.jade.fraclite.type;

import org.objectweb.fractal.api.factory.InstantiationException;
import org.objectweb.fractal.api.type.ComponentType;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.api.type.TypeFactory;

import fr.jade.fraclite.InitializationContext;
import fr.jade.fraclite.api.Controller;

/**
 * Provides a basic implementation of the {@link TypeFactory} interface.
 * <br>
 * <br>
 * <b>Requirements</b>
 * <ul>
 * <li>none.</li>
 * </ul>
 */

public class BasicTypeFactory  implements Controller, TypeFactory {

  public void initFcController(InitializationContext ic) throws InstantiationException {
  }
  
  public InterfaceType createFcItfType (
    final String name,
    final String signature,
    final boolean isClient,
    final boolean isOptional,
    final boolean isCollection) throws InstantiationException
  {
    return new BasicInterfaceType(
      name, signature, isClient, isOptional, isCollection);
  }

  public ComponentType createFcType (final InterfaceType[] interfaceTypes)
    throws InstantiationException
  {
    return new BasicComponentType(interfaceTypes);
  }

}
